//
//  edit_showPerson.m
//  SoundPill
//
//  Created by 宋旭东 on 15/4/26.
//  Copyright (c) 2015年 宋旭东. All rights reserved.
//

#import "edit_showPerson.h"


@interface edit_showPerson ()
@property (strong, nonatomic) UIImageView *personImg;
@end
@implementation edit_showPerson
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
    }
    return self;
}
- (void)removepersonName
{
    [self.personImg removeFromSuperview];
    [self.showPerson removeFromSuperview];
}
- (void)createSubviews:(NSString *)title
{
    self.personImg = [[UIImageView alloc] initWithFrame:CGRectMake(0, 2, 25, 25)];
    _personImg.image = [UIImage imageNamed:@"Player_person"];
    [self addSubview:_personImg];
    self.showPerson = [[UIButton alloc] initWithFrame:CGRectMake(_personImg.bounds.size.width, 0, self.frame.size.width - _personImg.frame.size.width, self.frame.size.height)];
    _showPerson.userInteractionEnabled = NO;
    [_showPerson setTitle:title forState:UIControlStateNormal];
    [self addSubview:_showPerson];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
